<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue.extend 扩展实例构造器</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Vue.extend 扩展实例构造器</h1>
    <hr>
    <author></author>
    <!-- 自定义无参数标签 -->
    <div id="author"></div>
    <!-- 普通标签 -->
    <script type="text/javascript">
        var authorExtend=Vue.extend({
            template:"<p><a :href='authorURL'>{{authorName}}</a></p>",
            data:function(){
                return{
                    authorName:'chen',
                    authorURL:"http://jspang.com"
                }
            }
        });
        new authorExtend().$mount("author");//挂载
        new authorExtend().$mount("#author");//挂载
    </script>
</body>
</html>